<?php
/**
 * 路由配置文件
 */
return [ 
    '__pattern__' => [
        'name' => '\w+',
        'userid'=> '\d+',
        'cid'=>'\d+'
    ],
    '__alias__' => [
        'index' => 'index/index',       //分包首页
    ], 
    '[state]'=>[
        'maintenance'=>['index/emptypage/maintenance']//维护页
    ],
    '[empty]' =>[                     
        '$' => ['index/emptypage/index']//404页面
    ],

    /**
     * 角色
     */
    '[services]'=>[
        'roles$'=>['services/admin/roles',['method'=>"get|post|options"]], //获取角色列表|新建角色
        'permissions'=>['services/admin/permissions',['method'=>"get|post|options"]],//获取权限列表|创建权限
        'members'=>['services/admin/userList',['method'=>"get|options"]], //成员列表|添加成员
        'members$'=>['services/admin/addUser', ['method'=>'post|options']], 
        'members/:id$'=>['services/admin/updateUser', ['method'=>'post|delete|options']],
        'roles/:id/permissions'=>['services/admin/permissionsByRole',['method'=>"get|options"]], //获取角色列表
        'roles/:id$'=>['services/admin/updateRoles',['method'=>"post|delete|options"]], //修改角色|删除角色
        
    ],
    
    /**
     * 权限、登陆接口
     */
    '[services/auth]'=>[
        'login$'=>['services/login/login', ['method'=>'post|options']],
        'logout$'=>['services/login/logout', ['method'=>'post|options']],
        'updatepassword$'=>['services/login/updatePassword', ['method'=>'post|options']],
        'unreadcount$'=>['services/login/unreadcount', ['method'=>'get|options']],
    ], 

    /**
     * 病例
     */
    '[services/case]'=>[
        'list$'=>['services/cases/caselist', ['method'=>'get|options']],
        'import$'=>['services/cases/importCase', ['method'=>'post|options']],
        'addattachment$'=>['services/cases/addAttachment', ['method'=>'post|options']],
        'detail$'=>['services/cases/casedetail', ['method'=>'get|options']],
        'delattachment$'=>['services/cases/delAttachment', ['method'=>'post|options']],
        'changeelement$'=>['services/cases/changeelement', ['method'=>'post|options']],
        'deletecase$'=>['services/cases/deleteCase', ['method'=>'post|options']],
        'export$'=>['services/cases/exportCase', ['method'=>'get|options']],
        'submitcase$'=>['services/cases/submitCase', ['method'=>'post|options']],
        'changelog$'=>['services/cases/changeLog', ['method'=>'get|options']],
        'baselist$'=>['services/cases/caseBaseList', ['method'=>'get|options']],

        //初审员
        'submitquestion$'=>['services/cases/submitQuestion', ['method'=>'post|options']],
        'submitfinal'=>['services/cases/submitFinal', ['method'=>'post|options']],
        
        //终审员
        'submitsuccess'=>['services/cases/submitSuccess', ['method'=>'post|options']],
        // 消息列表 翻页
        'noticelist$'=>['services/cases/noticeList', ['method'=>'get|options']],    


    ],   
    /**
     * 统计
     */
    '[services/statistic]'=>[
        'casealllist$'=>['services/statistic/caseAllList', ['method'=>'get|options']],
        'casechangelist$'=>['services/statistic/caseChangeList', ['method'=>'get|options']],
        'caselog$'=>['services/statistic/caseLog', ['method'=>'get|options']],
        //质量报告
        'qualityindex$'=>['services/statistic/qualityIndex', ['method'=>'get|options']],
        'qualityother$'=>['services/statistic/qualityOther', ['method'=>'get|options']],
        'exportresult$'=>['services/statistic/exportResult', ['method'=>'get|options']],
    ],    
    /**
     * question
     */
    '[services/question]'=>[
        'type$'=>['services/question/questionTypeList', ['method'=>'get|options']],
        'addtype$'=>['services/question/addType', ['method'=>'post|options']],
        'deltype$'=>['services/question/delType', ['method'=>'post|options']],
        'typeall$'=>['services/question/questionTypeAll', ['method'=>'get|options']],
    ], 
    /**
     * 系统设置
     */
    '[services/system]'=>[
        'userlist'=>['services/admin/userList',['method'=>"get|options"]],
        'userdetail'=>['services/admin/userDetail',['method'=>"get|options"]],
        'resetpassword$'=>['services/admin/resetPassword', ['method'=>'post|options']],
        'adduser$'=>['services/admin/addUser', ['method'=>'post|options']], 
        'deluser$'=>['services/admin/delUser', ['method'=>'post|options']], 
    ],

];